1. Field of the Invention
The present invention is generally in the field of debuggers and, more particularly, in the field of debugger retargetability.
2. Background Art
Software for embedded systems is conventionally developed using a single microcontroller or a digital signal processor (DSP) and either an emulation or simulation module to which a debugger is attached. A debugger is a tool that aids a programmer or developer in locating and correcting errors in the system. In the case of a simulation module, the system and the debugger are both implemented in software.
FIG. 1 illustrates a conventional exemplary single-processor system simulation, i.e. debugging system 100. In the present application, the entity upon which a debugger acts will be referred to as a “target” within a “system simulation.” A system simulation may include, for example, several targets, a scheduler, and a shared system resource such as a shared memory. Furthermore, a target may contain a central processing unit (CPU), among other elements. In FIG. 1, debugging system 100 includes a conventional debugger, i.e. debugger 110, which communicates with a processor model, i.e. system simulation 120.
Debugger 110 may be used to control and display the state of system simulation 120, through a variety of standard debugging functions. For example, debugger 110 may send “run”, “stop”, or “step” commands to the target. Furthermore, debugger 110 may “read” data from memory or registers within system simulation 120, or “write” data into memory or registers within system simulation 120. In addition to the aforementioned debugger functions, debugger 110 also requires an additional set of functions and components in order to customize the functionality for a specific target. In particular, a debugger must be designed to have interfaces that are compatible to the various types of registers, memory, or file formats within a target.
Typically, debuggers are customized by the manufacturer according to their intended target, e.g. an Intel® processor or a Motorola® processor. When faced with a new type of target, a conventional debugger must undergo substantial software code modifications, i.e. the debugger must be “retargeted”, before it can properly interface with the new target. Referring to the conventional debugging system 100 of FIG. 1, if system simulation 120 was altered or replaced with a different type of system simulation, the manufacturers of debugger 110 would have to build a custom version of debugger 110 that can operate with the new system simulation. For example, the software code in the debug core of debugger 110 may need to be recompiled in order to operate with new types of targets within a new system simulation. Currently, with the rapid changes in processor technologies, manufacturers of debuggers are continually forced to rebuild different versions of their debuggers to suit different processors, a practice that is both time consuming and technically laborious.
Thus there is a need in the art for a debugging system that does not have to be rebuilt or customized in order to effectively and properly operate with different or new targets.